<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>发布的信息列表</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.tabfont01 {	
	font-family: "宋体";
	font-size: 9px;
	color: #555555;
	text-decoration: none;
	text-align: center;
}
.font051 {font-family: "宋体";
	font-size: 12px;
	color: #333333;
	text-decoration: none;
	line-height: 20px;
}
.font201 {font-family: "宋体";
	font-size: 12px;
	color: #FF0000;
	text-decoration: none;
}
.button {
	font-family: "宋体";
	font-size: 14px;
	height: 37px;
}
html { overflow-x: auto; overflow-y: auto; border:0;} 
-->
</style>

<link href="../css/css.css" rel="stylesheet" type="text/css" />
<script type="text/JavaScript">

</script>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
</head>
<script language=JavaScript>
function selectAll(){
	var obj = document.fom.elements;
	for (var i=0;i<obj.length;i++){
		if (obj[i].name == "delid"){
			obj[i].checked = true;
		}
	}
}

function unselectAll(){
	var obj = document.fom.elements;
	for (var i=0;i<obj.length;i++){
		if (obj[i].name == "delid"){
			if (obj[i].checked==true) obj[i].checked = false;
			else obj[i].checked = true;
		}
	}
}
function link(){
    document.getElementById("fom").action="addrenwu.htm";
   document.getElementById("fom").submit();
}
function ConfirmDel()
{
    if(confirm("确定要删除吗？一旦删除将不能恢复！"))
       return true;
     else
        return false;
}
</script>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30">      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="62" background="../images/nav04.gif">    
          <form name="fom" id="fom" method="post" action=""> 
		   <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
		
		    <tr>
			  <td width="20%" align="center">通过分类查询：
			  <select id="mainclass" name="type">
					<option value="zero">爱心屋新闻</option>
					<option value="one">爱心屋通知</option>
					<option value="two">爱心屋鸣谢</option>
					<option value="three">爱心屋感想</option>
					<option value="all" checked>查询所有类型</option>
			  </select>
			    <input name="Submit3" type="submit" class="right-button07" value="查询" />	
			    </td>	  
		    </tr>
          </table>
         </form>
		  </td>
        </tr>
    </table></td></tr>
  <tr>
    <td><table id="subtree1" style="DISPLAY: " width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="40" class="font42">
				<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646" class="newfont03">
				 <tr class="CTitle" >
                    	<td height="22"  colspan="50" align="center" style="font-size:16px">发布的信息列表</td>
                  </tr>
                  <tr bgcolor="#EEEEEE">
				    <td width="2%" align="center" height="30">序号</td>
                    <td width="10%">信息标题</td>
					<td width="16%">发布作者</td>
                    <td width="16%">发布时间</td>
					<td width="16%">信息类型</td>
					<td width="15%">预览地址</td>
					<td width="14%">操作</td>
                  </tr>
                 <s:iterator value="infoList" var="t" status="st">
                 	<tr bgcolor="#FFFFFF">
				    
				    <td height="20"><s:property value="#st.count"/> </td>
                    
                    <td ><a href="#" onclick=""><s:property value="#t.title"/></a></td>
					
					<td><s:property value="#t.author" /></td>
                    
                    <td><s:property value="#t.time"/> </td>
									
					<td><s:if test="#t.type==0"><font color="blue">爱心屋新闻</font></s:if>
						<s:elseif test="#t.type==1"><font color="red">爱心屋通知</font></s:elseif>
						<s:elseif test="#t.type==2"><font color="yellow">爱心屋鸣谢</font></s:elseif>
						<s:else><font color="green">爱心屋感想</font></s:else>
					</td>
					
                    <td>
                    	<a href="<%=basePath %>web/viewInfor.action?id=${t.id}" target="_blank">前台预览</a>
                    </td>
                    
                    <td><a href="#"><img src="<%=path %>/files/images/edt.gif" width="16" height="16" />重新编辑</a>|
                    	<a href="delinfo.action?id=${t.id}" onclick="return ConfirmDel();">
                    	<img src="<%=path %>/files/images/del.gif" width="16" height="16" onclick="return ConfirmDel();"/>删除
                    	</a>
                    </td>
                    
                  </tr>
                 </s:iterator>
            	
            </table>
           </td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="6"><img src="../images/spacer.gif" width="1" height="1" /></td>
        </tr> 
        <tr>
          <td height="33"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="right-font08">
			    <tr align="right">
    	<td colspan="9">
    		共<s:property value="totalRows"/>行&nbsp;
    		第<s:property value="currentPage"/>页&nbsp;
    		共<s:property value="pager.getTotalPages()"/>页&nbsp;
    		<a href="<s:url value="showinfolist.action">
    			<s:param name="currentPage" value="currentPage"/>
    			<s:param name="pagerMethod" value="'first'"/>
    		</s:url>">首页</a>
    		<a href="<s:url value="showinfolist.action">
    			<s:param name="currentPage" value="currentPage"/>
    			<s:param name="pagerMethod" value="'previous'"/>
    		</s:url>">上一页</a>
    		<a href="<s:url value="showinfolist.action" >
    			<s:param name="currentPage" value="currentPage"/>
    			<s:param name="pagerMethod" value="'next'"/>
    		</s:url>">下一页</a>
    		<a href="<s:url value="showinfolist.action">
    			<s:param name="currentPage" value="currentPage"/>
    			<s:param name="pagerMethod" value="'last'"/>
    		</s:url>">尾页</a>
    	</td>
          </table>
          </td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>
